<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml" xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>08vue-属性绑定</title>
    <script type="text/javascript" src="static/vue.min.js"></script>
    <style>
        .red {
            color: red;
        }

        .font {
            font-size: 20px;
        }
    </style>

</head>
<body>
<div id="vue">
    <div class="red">起风了</div>
    <div class="font">起风了</div>
    <div class="font red">起风了</div>

    <!--使用vue-->
    <!--v-bind 表达式结果可以是字符串 数组 对象-->
    <div v-bind:class="{'red':isRed,'font':isFont}">周深</div>
    <div v-bind:class="['red','font']">周深</div>
    <a v-bind:href="cc">百度</a>
</div>



<script>
    new Vue({
        el: "#vue",
        data: {
            isRed: true,
            isFont: true,
            red:'red',
            cc:"http://www.baidu.com"
        },
        methods: {}
    });
</script>
</body>
</html>